package com.ellricky.baselib.adapter.course

import android.os.Bundle
import androidx.fragment.app.Fragment
import com.andr.common.util.ResUtil
import com.ellricky.baselib.BaseConstant
import com.ellricky.baselib.R
import com.ellricky.baselib.ui.base.BaseTabVpActivity

class JobTrainingActivity : BaseTabVpActivity() {

    override fun getFragmentList(): MutableList<Fragment> {

        val bundle1 = Bundle().apply {
            putString(BaseConstant.KEY_TYPE, BaseConstant.TYPE_JOB_TRAIN)
            putString(BaseConstant.TYPE_JOB_TRAIN_INDEX, BaseConstant.TYPE_JOB_TRAIN_INDEX_1)
        }
        val bundle2 = Bundle().apply {
            putString(BaseConstant.KEY_TYPE, BaseConstant.TYPE_JOB_TRAIN)
            putString(BaseConstant.TYPE_JOB_TRAIN_INDEX, BaseConstant.TYPE_JOB_TRAIN_INDEX_2)
        }
        return mutableListOf(
            JobTrainingChildFragment.newInstance(bundle1),
            JobTrainingChildFragment.newInstance(bundle2)
        )
    }

    override fun getTabTitleList(): MutableList<String> {
        return ResUtil.getStrArr(this, R.array.base_job_training)
            .toMutableList()
    }

    override fun getTitleRes(): Int {
        return R.string.base_job_training_title
    }
}